package com.pearlsoft.rms;


/**
 * 
 * @author rainshow
 * @Created 2012-5-11 上午11:06:34
 */

public interface VcenterMonitor {

    /**
     * 
     * @param vmname 虚拟机名称
     * @param counterName<br>
     *        cpu:[capacity.entitlement, wait, run, costop, used, ready,
     *        cpuentitlement, swapwait, utilization, latency, coreUtilization,
     *        capacity.provisioned, totalmhz, entitlement, demand, maxlimited,
     *        corecount.provisioned, overlap, corecount.contention,
     *        corecount.usage, capacity.usage, usagemhz, capacity.demand, idle,
     *        totalCapacity, system, reservedCapacity, usage,
     *        capacity.contention] <br>
     * <br>
     *        mem:[swapoutRate, swapunreserved, unreserved, vmmemctl, zero,
     *        heap, consumed.vms, totalmb, latency, overhead, consumed,
     *        llSwapUsed, capacity.usable, heapfree, reservedCapacity.vmkOvrhd,
     *        overheadMax, shared, llSwapIn, capacity.usage.vmOvrhd,
     *        consumed.userworlds, llSwapOutRate, sharedcommon, capacity.usage,
     *        totalCapacity, compressed, swapused, swapout, sysUsage, active,
     *        activewrite, capacity.entitlement, swaptarget, state, granted,
     *        swapOut, lowfreethreshold, swapped, capacity.usage.vmkOvrhd,
     *        capacity.provisioned, reservedCapacity.vm, capacity.usage.vm,
     *        entitlement, llSwapInRate, reservedCapacityPct, compressionRate,
     *        swapinRate, capacity.usage.userworld, reservedCapacity.userworld,
     *        swapIn, zipped, overheadTouched, reservedCapacity.vmOvhd,
     *        mementitlement, reservedCapacity, llSwapOut, swapin, zipSaved,
     *        vmmemctltarget, usage, decompressionRate, capacity.contention]<br>
     * <br>
     *        disk:[commandsAborted, queueWriteLatency, deltaused,
     *        kernelLatency, provisioned, commands, busResets, used,
     *        numberWriteAveraged, capacity.provisioned, write, read, capacity,
     *        totalReadLatency, deviceReadLatency, deviceLatency,
     *        kernelReadLatency, numberRead, unshared, numberReadAveraged,
     *        deviceWriteLatency, queueReadLatency, capacity.usage,
     *        throughput.usage, maxQueueDepth, numberWrite, maxTotalLatency,
     *        scsiReservationCnflctsPct, kernelWriteLatency,
     *        throughput.contention, totalLatency, scsiReservationConflicts,
     *        usage, commandsAveraged, capacity.contention, queueLatency,
     *        totalWriteLatency]<br>
     * @param starttime 多少分钟前开始(20，表示从20分钟前开始取样)
     * @param duration 持续多久（20，表示持续取样20分钟）
     * @param interval 取样时间间隔（300，表示300秒取样一次）
     * @return
     */
    MetricResult getHistoryCpuInfo(String vmname, String counterName, int starttime, int duration, int interval);

    MetricResult getHistoryMemInfo(String vmname, String counterName, int starttime, int duration, int interval);

    MetricResult getHistoryDiskInfo(String vmname, String counterName, int starttime, int duration, int interval);

    /**
     * 
     * @param vmname 虚拟机名称
     * @param counterName <br>
     *        cpu:[capacity.entitlement, wait, run, costop, used, ready,
     *        cpuentitlement, swapwait, utilization, latency, coreUtilization,
     *        capacity.provisioned, totalmhz, entitlement, demand, maxlimited,
     *        corecount.provisioned, overlap, corecount.contention,
     *        corecount.usage, capacity.usage, usagemhz, capacity.demand, idle,
     *        totalCapacity, system, reservedCapacity, usage,
     *        capacity.contention] <br>
     * <br>
     *        mem:[swapoutRate, swapunreserved, unreserved, vmmemctl, zero,
     *        heap, consumed.vms, totalmb, latency, overhead, consumed,
     *        llSwapUsed, capacity.usable, heapfree, reservedCapacity.vmkOvrhd,
     *        overheadMax, shared, llSwapIn, capacity.usage.vmOvrhd,
     *        consumed.userworlds, llSwapOutRate, sharedcommon, capacity.usage,
     *        totalCapacity, compressed, swapused, swapout, sysUsage, active,
     *        activewrite, capacity.entitlement, swaptarget, state, granted,
     *        swapOut, lowfreethreshold, swapped, capacity.usage.vmkOvrhd,
     *        capacity.provisioned, reservedCapacity.vm, capacity.usage.vm,
     *        entitlement, llSwapInRate, reservedCapacityPct, compressionRate,
     *        swapinRate, capacity.usage.userworld, reservedCapacity.userworld,
     *        swapIn, zipped, overheadTouched, reservedCapacity.vmOvhd,
     *        mementitlement, reservedCapacity, llSwapOut, swapin, zipSaved,
     *        vmmemctltarget, usage, decompressionRate, capacity.contention]<br>
     * <br>
     *        disk:[commandsAborted, queueWriteLatency, deltaused,
     *        kernelLatency, provisioned, commands, busResets, used,
     *        numberWriteAveraged, capacity.provisioned, write, read, capacity,
     *        totalReadLatency, deviceReadLatency, deviceLatency,
     *        kernelReadLatency, numberRead, unshared, numberReadAveraged,
     *        deviceWriteLatency, queueReadLatency, capacity.usage,
     *        throughput.usage, maxQueueDepth, numberWrite, maxTotalLatency,
     *        scsiReservationCnflctsPct, kernelWriteLatency,
     *        throughput.contention, totalLatency, scsiReservationConflicts,
     *        usage, commandsAveraged, capacity.contention, queueLatency,
     *        totalWriteLatency]<br>
     * 
     * @param interval 时间间隔（20）
     * @return
     */
    MetricResult getRealtimeCpuInfo(String vmname, String counterName, int interval);

    MetricResult getRealtimeMemInfo(String vmname, String counterName, int interval);

    MetricResult getRealtimeDiskInfo(String vmname, String counterName, int interval);
}
